package com.bjtu.transactionclient.dao;

import com.bjtu.transactionclient.domain.User;
import com.bjtu.transactionclient.domain.UserIndexNoTable;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository("UserDao")

public interface UserDao {
    @Select("select UserNo from usertable where UserTeamNo = #{userTeamNo} and UserNo != #{userNo}")
    List<String> findAllMembers( @Param("userTeamNo") String userTeamNo,@Param("userNo") String userNo);

    @Select("select UserRole from usertable where UserNo = #{userNo}")
    String getRole(@Param("userNo")String userNo);

    @Select("select * from usertable where UserNo = #{userNo}")
    User queryUserNoByIndex(@Param("userNo") String userNo);


}
